// SETUP

#include intrographics.txt
#include ladyluckbiggraphics.txt

setdatapath("data/graphics/cutscenes/witch/");

var witchgraphics = {
	idle: {
		animation: "witch_idle.json",
		pack: "witch.pck",
		loop: true
	},
	worried_idle: {
		animation: "witch_worried_idle.json",
		pack: "witch.pck",
		loop: true
	}
}
var witch = addsprite("witch", 1, witchgraphics);

// HELPER FUNCTIONS	

var fade_time = 0.4;

// ACTORS
actor("Lady Luck", screenwidthmid + 800, 550, Col.YELLOW, CENTER, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
actor("Witch", 2600, 600, 0xb496ec, RIGHT, TOP, "chat_witch", "characters/witch/charicon_witch");

// INTRO

play("music_cutscene_dark");

witch.scale = 0.5;
witch.x = 2700 - ((witch.getwidth("idle") * witch.scale) / 2);
witch.y = 650;
changebackground("intro_stage");
fadein();
witch.show("idle");

ladyluck_big.x = -screenwidth;
ladyluck_big.show("idle");
Actuate.tween(ladyluck_big, 2, { x: 0 }).ease(Expo.easeOut);
play("cutscene_audience");

wait(0.5);

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "Ah, my lovely little witch.");
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
ladyluck_big.show("talking-sly", true);
speak("Lady Luck", "Your friends are getting close to giving up, you know.");
speak("Lady Luck", "But I'll tell you what - if you quit first, I won't make|you fight the next round of contestants.");
speak("Lady Luck", "I'll let you have a go as the Dicey Dungeons|social media intern instead.");
ladyluck_big.show("idle-sly", true);

actor("Witch", 2680, 730, 0xb496ec, CENTER, BOTTOM, "chat_witch", "characters/witch/charicon_witch");
speak("Witch", "You know what, you can just go and-");

ladyluck_big.show("talking-sly", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "No swearing, my dear! Remember - we're on television.");
ladyluck_big.show("idle-sly", true);

speak("Witch", "...go and make other recruitment arrangements,|because I'm not doing anything for you. Ever.");
speak("Witch", "And when I get out, I'm gonna tell|everyone just how evil you are!");

ladyluck_big.show("talking-thinking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "'When you get out...’?");
ladyluck_big.show("talking-scary", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "Every time I think you start to understand your situation,|you make it clear that you really, really don't.");
speak("Lady Luck", "Well, maybe another fight or two will|help to clear it up...");
ladyluck_big.show("idle-scary", true);

startgamefromcutscene();